<template>
  <div class="app-container">
    <el-card class="box-card">
      <div class="cont-top">
        <div class="con-title">动画旋转效果</div>
      </div>
      <div class="cont-bottom">
        <p>100%</p>
      </div>
    </el-card>

    <el-card class="box-card">
      <div class="cont-top">
        <div class="con-title">仿真水滴效果</div>
      </div>
      <div class="cont-bottom">
        <WaterDrop />
      </div>
    </el-card>
    <el-card class="box-card">
      <div class="cont-top">
        <div class="con-title">3D卡片旋转-鼠标悬浮</div>
      </div>
      <div class="cont-bottom">
        <CardSpin />
      </div>
    </el-card>
    <el-card class="box-card">
      <div class="cont-top">
        <div class="con-title">打开快递</div>
      </div>
      <div class="cont-bottom">
        <OpenExpress />
      </div>
    </el-card>
    <el-card class="box-card">
      <div class="cont-top">
        <div class="con-title">测试效果</div>
      </div>
      <div class="cont-bottom"></div>
    </el-card>
  </div>
</template>

<script>
// 水滴
import WaterDrop from './components/WaterDrop.vue'
// 3D卡片旋转
import CardSpin from './components/CardSpin.vue'
// 快递箱子
import OpenExpress from './components/OpenExpress.vue'
export default {
  name: 'Purejs',
  components: {
    WaterDrop,
    CardSpin,
    OpenExpress
  }
}
</script>

<style lang="scss" scoped>
.app-container {
  // background-color: #ccc;
  height: 845px;
  display: flex;
  align-content: flex-start;
  flex-wrap: wrap;
  // 适配谷歌火狐，没有书签栏的上下边距
  @media screen and (min-height: 950px) and (max-height: 990px) {
    margin-top: 15px;
    // margin-bottom: 50px;
  }
  // 适配浏览器全屏模式下的上下边距
  @media screen and (min-height: 1070px) {
    margin-top: 60px;
    margin-bottom: 100px;
  }

  ::v-deep .box-card {
    width: 32%;
    height: 328px;
    margin: 0 2% 1% 0;
    &:nth-child(3n) {
      margin-right: 0;
    }
    &:first-child {
      .el-card__body {
        .cont-bottom {
          background-color: #001e57;
          p {
            width: 168px;
            font-size: 20px;
            text-align: center;
            line-height: 168px;
            color: #ffffff;
            position: relative;
            // background: skyblue;
          }
          p::after {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            // transform: translate(-50%,-50%);
            width: 168px;
            height: 168px;
            display: block;
            background-image: url('https://img.thgykj.com/thgy-file/ff8006e7453b48929a0df3baef7f63421695284381210.png');
            background-size: cover;
            background-position: 100% 100%;
            animation: rotate 6s infinite linear;
          }
        }
      }
    }
    .el-card__body {
      height: 100%;
      padding: 0;
      display: flex;
      flex-direction: column;
      // align-items: center;
      .cont-top {
        height: 50px;
        .con-title {
          line-height: 50px;
          padding-left: 10px;
          font-size: 16px;
          font-family: PingFang SC-Bold, PingFang SC;
          font-weight: bold;
          border-bottom: 1px solid #f4f4f4;
        }
      }
      .cont-bottom {
        flex: 1;
        // padding: 10px;
        display: flex;
        justify-content: center;
        align-items: center;
        // background: skyblue;
      }
    }
    // box-shadow: 0px 0px 6px 0px rgba(51, 59, 72, 0.04);
    // border-radius: 8px;
    // background: #fff;
  }
}
</style>
